Conversation
| @@ -1,16 +1,21 @@ | |||
| // tests/example.spec.js | |||
| const { test, expect } = require('@playwright/test'); | |||
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| const { test, expect } = require('@playwright/test'); | |
| const { test, expect } = require("@playwright/test"); |
| test.describe('Playwright Basic Workflow Tests', () => { | ||
| test('should load example.com and verify title', async ({ page }) => { | ||
| await page.goto('https://example.com'); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| test.describe('Playwright Basic Workflow Tests', () => { | |
| test('should load example.com and verify title', async ({ page }) => { | |
| await page.goto('https://example.com'); | |
| test.describe("Playwright Basic Workflow Tests", () => { | |
| test("should load example.com and verify title", async ({ page }) => { | |
| await page.goto("https://example.com"); |
Playwright Test MetricsTotal: 4 Duration: 4575687 ms ESLint (GUI tests)Test-Flow ChartNote: The flowchart.png is uploaded as an artifact. To embed it directly like screenshots,you would also need to copy it into the 'published-screenshots' directory in step 9,and then reference it using the PR-specific GitHub Pages URL.Artifact: test-flow-chart → flowchart.png Playwright Screenshots for this PRFull run details: link |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
| await expect(page).toHaveTitle(/Example Domain/); | ||
| await page.screenshot({ path: 'playwright-report/example-domain.png' }); | ||
| // **CHANGE THIS LINE:** Use process.env.PLAYWRIGHT_SCREENSHOT_DIR | ||
| await page.screenshot({ path: `${process.env.PLAYWRIGHT_SCREENSHOT_DIR || 'published-screenshots'}/example-domain.png` }); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await page.screenshot({ path: `${process.env.PLAYWRIGHT_SCREENSHOT_DIR || 'published-screenshots'}/example-domain.png` }); | |
| await page.screenshot({ | |
| path: `${process.env.PLAYWRIGHT_SCREENSHOT_DIR || "published-screenshots"}/example-domain.png`, | |
| }); |
| test('should find and click the More information link', async ({ page }) => { | ||
| await page.goto('https://example.com'); | ||
| await page.click('text=More information'); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| test('should find and click the More information link', async ({ page }) => { | |
| await page.goto('https://example.com'); | |
| await page.click('text=More information'); | |
| test("should find and click the More information link", async ({ page }) => { | |
| await page.goto("https://example.com"); | |
| await page.click("text=More information"); |
| await expect(page).toHaveURL(/iana.org/); | ||
| await page.screenshot({ path: 'playwright-report/navigation.png' }); | ||
| // **CHANGE THIS LINE:** Use process.env.PLAYWRIGHT_SCREENSHOT_DIR | ||
| await page.screenshot({ path: `${process.env.PLAYWRIGHT_SCREENSHOT_DIR || 'published-screenshots'}/navigation.png` }); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await page.screenshot({ path: `${process.env.PLAYWRIGHT_SCREENSHOT_DIR || 'published-screenshots'}/navigation.png` }); | |
| await page.screenshot({ | |
| path: `${process.env.PLAYWRIGHT_SCREENSHOT_DIR || "published-screenshots"}/navigation.png`, | |
| }); |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
| @@ -1,16 +1,86 @@ | |||
| const { defineConfig } = require('@playwright/test'); | |||
| // @ts-check | |||
| const { defineConfig, devices } = require('@playwright/test'); | |||
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| const { defineConfig, devices } = require('@playwright/test'); | |
| const { defineConfig, devices } = require("@playwright/test"); |
| */ | ||
| module.exports = defineConfig({ | ||
| testDir: './tests', | ||
| /* Run tests in files in parallel */ |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| testDir: './tests', | |
| testDir: "./tests", |
| workers: process.env.CI ? 1 : undefined, | ||
| /* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
| reporter: 'html', // Default reporter, can be overridden by CLI | ||
| /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| reporter: 'html', // Default reporter, can be overridden by CLI | |
| reporter: "html", // Default reporter, can be overridden by CLI |
|
|
||
| /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
| trace: 'on-first-retry', | ||
|
|
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| trace: 'on-first-retry', | |
| trace: "on-first-retry", |
| use: { ...devices['Desktop Chrome'] }, | ||
| }, |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| name: 'chromium', | |
| use: { ...devices['Desktop Chrome'] }, | |
| name: "chromium", | |
| use: { ...devices["Desktop Chrome"] }, |
| use: { ...devices['Desktop Firefox'] }, | ||
| }, |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| name: 'firefox', | |
| use: { ...devices['Desktop Firefox'] }, | |
| name: "firefox", | |
| use: { ...devices["Desktop Firefox"] }, |
| use: { ...devices['Desktop Safari'] }, | ||
| }, |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| name: 'webkit', | |
| use: { ...devices['Desktop Safari'] }, | |
| name: "webkit", | |
| use: { ...devices["Desktop Safari"] }, |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |
| screenshot: 'only-on-failure', // or 'on' if you want screenshots for all steps | ||
| video: 'on-first-retry', | ||
| output: process.env.PLAYWRIGHT_SCREENSHOT_DIR || 'test-results', // This is the key! |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| screenshot: 'only-on-failure', // or 'on' if you want screenshots for all steps | |
| video: 'on-first-retry', | |
| output: process.env.PLAYWRIGHT_SCREENSHOT_DIR || 'test-results', // This is the key! | |
| screenshot: "only-on-failure", // or 'on' if you want screenshots for all steps | |
| video: "on-first-retry", | |
| output: process.env.PLAYWRIGHT_SCREENSHOT_DIR || "test-results", // This is the key! |
|
👋 Hello! Here's the link to our GitHub Pages site: This link will always show the latest version from our main branch. |


No description provided.